using UnityEngine;
using System;
using System.IO;
using System.Collections.Generic;
using WFTools;

[Serializable]
public class MonsterSetting 
{ 
	/// <summary>
	///怪物ID
	/// <summary>

	public readonly int ID;
	/// <summary>
	///怪物类型/Enum：
	///1、普通；2、精英；3、Boss
	/// <summary>

	public readonly int MobType;
	/// <summary>
	///怪物隶属/Enum：
	///1、A行星
	/// <summary>

	public readonly int Chapter;
	/// <summary>
	///血量
	/// <summary>
[PropAttribute(PropertyEnum.Hp)]
	public readonly float Hp;
	/// <summary>
	///攻击力
	/// <summary>
[PropAttribute(PropertyEnum.Atk)]
	public readonly float Atk;
	/// <summary>
	///攻击距离/enum：
	///1、近战；2、远程
	/// <summary>
[PropAttribute(PropertyEnum.Range)]
	public readonly float Range;
	/// <summary>
	///移动类型
	/// <summary>

	public readonly int MoveType;
	/// <summary>
	///基础速度倍率
	/// <summary>

	public readonly float Speed;
	/// <summary>
	///移动路线/Enum：
	///1、直线；2、钟摆；
	/// <summary>

	public readonly int Routine;
	/// <summary>
	///暴击伤害调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_CriticalHurt;
	/// <summary>
	///枪械受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Gun;
	/// <summary>
	///低温受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Ice;
	/// <summary>
	///力场受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Force;
	/// <summary>
	///热核受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Nuclear;
	/// <summary>
	///能量受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Beam;
	/// <summary>
	///动能受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Kinetic;
	/// <summary>
	///辐射受伤调整
	///rem：
	///val>0，受伤降低，系数
	/// <summary>

	public readonly float DecInjure_Radiation;
	/// <summary>
	///受到所有伤害降低
	/// <summary>

	public readonly float DecInjure_All;
	/// <summary>
	///免伤次数
	///rem：
	///免疫伤害效果次数
	/// <summary>

	public readonly int Times_Invincible;
	/// <summary>
	///对击退免疫
	///rem：
	///val>0，降低被添加击退效果的可能性，系数
	/// <summary>

	public readonly float Imu_Repel;
	/// <summary>
	///对眩晕免疫
	///rem：
	///val>0，降低被添加眩晕效果的可能性，系数
	/// <summary>

	public readonly float Imu_Stun;
	/// <summary>
	///对辐射伤害免疫
	///rem：
	///val>0，降低被添加辐射效果的可能性，系数
	/// <summary>

	public readonly float Imu_Infect;
	/// <summary>
	///对冻结免疫
	///rem：
	///val>0，降低被添加冻结效果的可能性，系数
	/// <summary>

	public readonly float Imu_Freeze;
	/// <summary>
	///对击穿免疫
	///rem：
	///val>0，降低被击穿的可能性，系数
	/// <summary>

	public readonly float Imu_Pierce;
	/// <summary>
	///对点燃免疫
	///rem：
	///val>1，降低被添加点燃效果的可能性，系数
	/// <summary>

	public readonly float Imu_Ignite;
	/// <summary>
	///动画引用ID
	/// <summary>

	public readonly List<SheetConfig> Anm_Config;
	/// <summary>
	///怪物半径
	/// <summary>

	public readonly float MobRadius;
	/// <summary>
	///怪物大小缩放
	/// <summary>

	public readonly float MobScaleRatio;
	/// <summary>
	///击杀经验
	/// <summary>

	public readonly float Killexe;
	/// <summary>
	///远程怪物引用子弹
	///引用
	/// <summary>

	public readonly string BulletRef;
	/// <summary>
	///名称
	/// <summary>

	public readonly string Name;
	/// <summary>
	///技能/ref
	/// <summary>

	public readonly int Skill;
	/// <summary>
	///死亡触发技能/ref
	/// <summary>

	public readonly int DeadSkill;
	public MonsterSetting(List<string> datas)
{	
		int value = 0;
		ID = int.Parse(datas[0]);
		MobType = int.Parse(datas[3]);
		Chapter = int.Parse(datas[4]);
		Hp = float.Parse(datas[5]);
		Atk = float.Parse(datas[6]);
		Range = float.Parse(datas[7]);
		MoveType = int.Parse(datas[8]);
		Speed = float.Parse(datas[9]);
		Routine = int.Parse(datas[10]);
		DecInjure_CriticalHurt = float.Parse(datas[11]);
		DecInjure_Gun = float.Parse(datas[12]);
		DecInjure_Ice = float.Parse(datas[13]);
		DecInjure_Force = float.Parse(datas[14]);
		DecInjure_Nuclear = float.Parse(datas[15]);
		DecInjure_Beam = float.Parse(datas[16]);
		DecInjure_Kinetic = float.Parse(datas[17]);
		DecInjure_Radiation = float.Parse(datas[18]);
		DecInjure_All = float.Parse(datas[19]);
		Times_Invincible = int.Parse(datas[20]);
		Imu_Repel = float.Parse(datas[21]);
		Imu_Stun = float.Parse(datas[22]);
		Imu_Infect = float.Parse(datas[23]);
		Imu_Freeze = float.Parse(datas[24]);
		Imu_Pierce = float.Parse(datas[25]);
		Imu_Ignite = float.Parse(datas[26]);
		Anm_Config = TableDataMgr.Instance.ConvertTypeList<SheetConfig>(datas[27],'\n',',',s => new SheetConfig(s));
		MobRadius = float.Parse(datas[28]);
		MobScaleRatio = float.Parse(datas[29]);
		Killexe = float.Parse(datas[30]);
		BulletRef = datas[31];
		Name = datas[32];
		Skill = int.Parse(datas[33]);
		DeadSkill = int.Parse(datas[34]);
	}
} 
